<!DOCTYPE html>
<html>
<head>
<title>会员管理</title>
#include("../include/common.html")
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>会员管理</h5>
            </div>
            <form id="listForm" action="list" method="get">
                <div class="ibox-content">
                    <!-- 搜索 start -->
                    <div class="form-horizontal clear">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">手机号码：</label>
                            <div class="col-sm-2"><input class="form-control" type="text" name="mobile" value="#(mobile)"></div>
                            <label class="col-sm-1 control-label">昵称：</label>
                            <div class="col-sm-2"><input class="form-control" type="text" name="nickname" value="#(nickname)"></div>
                        </div>
                        <div class="text-center">
                            <input type="submit" class="btn btn-primary btn-w-m" value="查 询">
                            <input type="reset" class="btn btn-primary btn-w-m" value="重 置">
                        </div>
                    </div>
                    <!-- 搜索 end -->
                    <!-- 列表 start -->
                    <div class="form-horizontal clear">
                        <div class="form-group">
                            <div class="col-sm-8">
                                <a class="btn btn-primary" href="add"><i class="fa fa-plus"></i> 添加</a>
                                <a href="javascript:;" class="btn btn-warning disabled" id="deleteButton"><i class="fa fa-trash"></i> 删除</a>
                                <a href="javascript:;" class="btn btn-primary" id="refreshButton"><i class="fa fa-refresh"></i> 刷新</a>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table class="table table-bordered" id="listTable">
                                <thead>
                                    <tr>
                                        <th width="40" class="text-center"><input type="checkbox" id="selectAll" /></th>
                                        <th>ID</th>
                                        <th>openid</th>
                                        <th>昵称</th>
                                        <th>头像</th>
                                        <th>手机号码</th>
                                        <th>会员等级</th>
                                        <th>余额</th>
                                        <th>上级</th>
                                        <th>分销级别</th>
                                        <th>创建日期</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    #for(member : page.list)
                                    <tr>
                                        <td class="text-center"><input type="checkbox" name="ids" value="#(member.id)" /></td>
                                        <td>#(member.id)</td>
                                        <td>#(member.weixinOpenId)</td>
                                        <td>#(member.nickname)</td>
                                        <td><img src="#(member.avatar)" height="50"/></td>
                                        <td>#(member.mobile)</td>
                                        <td>#if(member.memberRank??) #(member.memberRank.name) #end</td>
                                        <td>#(member.amount)</td>
                                        <td>
                                        	#if(member.parentId??) 
                                        		ID:#(member.parent.id)<br>
				                                                                                昵称:#(member.parent.nickname??"")<br>
				                                                                                手机号码:#(member.parent.mobile??"")<br>
                                        	#else 
                                        	- 
                                        	#end
                                       	</td>
                                        <td>#if(member.distributeRank??) #(member.distributeRank.name) #end</td>
                                        <td>#date(member.createDate,"yyyy-MM-dd")</td>
                                        <td>
                                            <a href="edit?id=#(member.id)">[编辑]</a>
                                            <a href="balance?memberId=#(member.id)">[余额管理]</a>
                                            <a href="order?memberId=#(member.id)">[订单明细]</a>
                                        </td>
                                    </tr>
                                    #end
                                </tbody>
                            </table>
                        </div>
                        <div class="text-center">
                            #pagination(pageNumber = page.pageNumber,totalPages = page.totalPage,pattern = "")
                                #include("../include/pagination.html")
                            #end
                        </div>
                    </div>
                    <!-- 列表 end -->
                </div>
            </form>
        </div>
    </div>
</body>
</html>